package com.sinoglobal.wallet.app;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

import com.sinoglobal.wallet.R;

import java.util.HashMap;
import java.util.Map;

/**
 * APP的全局管理类
 *
 * @author KeZhuang
 */
public class SinoApplication {

    private static SinoApplication instance;
    /**
     * 打印日志开关
     */
    public static boolean sLogSwitch = true;
    /**
     * Log的TAG
     */
    public static String sLogTag = "--Main--";
    /**
     * 存放全局参数的Map集合
     */
    public static Map<String, Object> sMap = new HashMap<String, Object>();

    /**
     * @return 获得全局参数管理集合
     */
    public static Map<String, Object> getMap() {
        return sMap;
    }

    public static String versionCodeUrl = "";//服务器传过来的版本号
    private String netType;//网络类型  2G 3G/4G wifi
    private boolean netStatus;//网络连接状态 连接或断开


    /**
     * @return Application 实例
     */
    public static SinoApplication getInstance() {
        if (instance == null) {
            synchronized (SinoApplication.class) {
                if (instance == null) instance = new SinoApplication();
            }
        }
        return instance;
    }

    public void setNetType(String netType) {
        this.netType = netType;
    }

    public String getNetType() {
        return netType;
    }

    public void setNetStatus(boolean netStatus) {
        this.netStatus = netStatus;
    }

    public boolean getNetStatus() {
        return netStatus;
    }
}
